<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 3.使用组件 -->
        <zujian></zujian>
        <zujian></zujian>
        <zujian2></zujian2>
        <zujian2></zujian2>
        <zujian2></zujian2>
    </div>
</body>
<script src="./vue.min.js"></script>
<script>
    //1.创建组件
    let zujian = Vue.extend({
        template: `<div>
            <h1>哈哈组件来了</h1>
            <p>6666</p>
        </div>`
    })
    let zujian2 = Vue.extend({
        template: `<div>
            <h1>组件2222来了</h1>
            <p>2222</p>
        </div>`
    })
    // 2.注册组件
    let vm = new Vue({
        el:"#app",
        data:{},
        components:{
            zujian:zujian,
            zujian2:zujian2
        }
    })
</script>
</html>